<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>v-else和v-else-if</title>
</head>
<body>
<div id="app">
  <div v-if="type == 1">A</div>
  <div v-else-if="type == 2">B</div>
  <div v-else-if="type == 3">C</div>
  <div v-else>D</div>
</div>
 <script src="./vue.global.js"></script>
 <script>
   const vue=Vue.createApp({
       data(){
           return{
               type:2
           }
       }
   }).mount('#app')
 </script>
</body>
</html>